package logic;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import ui.AdminCreateUser;

public class ACListAdmin implements ActionListener {
	ui.AdminPanel adminPanel;
	ui.AdminUI adminUI;
	logic.ACMethodAdmin acmethodadmin;
	ui.AdminCenterPanel admincenterPanel;
	ui.AdminExchangeRate adminexchangerate;
	AdminCreateUser admincreateuser;

	public ACListAdmin(ui.AdminPanel adminPanel, ui.AdminUI adminUI,
			ui.AdminCenterPanel admincenterPanel) {
		this.adminUI = adminUI;
		this.admincenterPanel = admincenterPanel;
		this.admincreateuser = admincenterPanel.adminCreateUser;
		this.adminPanel = adminPanel;
		this.adminexchangerate = admincenterPanel.adminexchangerate;

	}

	@Override
	public void actionPerformed(ActionEvent e) {
		logic.ACMethodAdmin b = new ACMethodAdmin(adminUI, admincenterPanel);
		String ac = e.getActionCommand();
		if (ac.equals("CreateUserMenu")) {
			b.create();
		}

		else if (ac.equals("ExchangeRateMenu")) {

			b.exchange();
		}

		else if (ac.equals("ExchangeConfirm")) {
			System.out.println("confirm");

		}

		else if (ac.equals("CreateUser")) {
			b.CreateUser();

		}

		else if (ac.equals("AdminHome")) {
			b.AdminHome();
		}

	}
}